<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Aquamat: Plik źródłowy eeprom.h (r58/r57)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Wygenerowano przez Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="pages.html"><span>Dodatkowe&nbsp;strony</span></a></li>
      <li><a href="annotated.html"><span>Struktury&nbsp;Danych</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<h1>eeprom.h (r58/r57)</h1><a href="eeprom_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Aquamat - Sterownik akwariowy Open Source</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2009 Wojciech Todryk (wojciech@todryk.pl)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00018"></a>00018 <span class="comment">    </span>
<a name="l00019"></a>00019 <span class="comment">    $Id$</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a>00021 
<a name="l00026"></a><a class="code" href="eeprom_8h.html#a79a42ec6c6c8bbbe6e34ed57a52aac59">00026</a> <span class="preprocessor">#define     EEMEM   __attribute__((section(&quot;.eeprom&quot;)))</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a><a class="code" href="eeprom_8h.html#a00f5d260d37f57aa4c0eff455269e434">00028</a> <span class="preprocessor">#define EEPROM_TEMP_SETTINGS_BEGIN 10</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a><a class="code" href="eeprom_8h.html#abc6ec4a8c0cc4ce678ad20c473eb9148">00030</a> <span class="preprocessor">#define EEPROM_TEMP_ROM_OFFSET 0</span>
<a name="l00031"></a><a class="code" href="eeprom_8h.html#ade2f14e80cb654608f3c131f48d8e0ca">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_TARGET_OFFSET (EEPROM_TEMP_ROM_OFFSET + 8)</span>
<a name="l00032"></a><a class="code" href="eeprom_8h.html#a9511ca933c40b744a27cebf03a8207e9">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_TARGET_NIGHT_OFFSET (EEPROM_TEMP_TARGET_OFFSET + 2)</span>
<a name="l00033"></a><a class="code" href="eeprom_8h.html#ad2acfab9f5e9a67a9dad9046e239faed">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_MAX (EEPROM_TEMP_TARGET_NIGHT_OFFSET + 2)</span>
<a name="l00034"></a><a class="code" href="eeprom_8h.html#a868f938ee84f2b0b6ac9f5bb2b8da7dd">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_MIN (EEPROM_TEMP_MAX + 2)</span>
<a name="l00035"></a><a class="code" href="eeprom_8h.html#a47655fd626c0e870b6727ef319bb4fa9">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_HISTERESIS (EEPROM_TEMP_MIN + 2)</span>
<a name="l00036"></a><a class="code" href="eeprom_8h.html#a0fd9743e7580c8b0766a7a222f549fbc">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_FLAGS (EEPROM_TEMP_HISTERESIS + 1)</span>
<a name="l00037"></a><a class="code" href="eeprom_8h.html#a3a3c1c7b1953472862d79d048c920b30">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_OUT_HEATING (EEPROM_TEMP_FLAGS + 1)</span>
<a name="l00038"></a><a class="code" href="eeprom_8h.html#ac14d6af60f919c8e53736865c4ee0f68">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_OUT_COOLING (EEPROM_TEMP_OUT_HEATING + 1)</span>
<a name="l00039"></a><a class="code" href="eeprom_8h.html#a0c3cab0b6c2b50250ec942091b21ae03">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TEMP_SIZE (EEPROM_TEMP_OUT_COOLING + 1)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a><a class="code" href="eeprom_8h.html#aa846cd4c367d105fd53f927f905f5e45">00041</a> <span class="preprocessor">#define EEPROM_OUTS_SETTING_BEGIN ((EEPROM_TEMP_SIZE*TEMP_SENSORS_NUM)+EEPROM_TEMP_SETTINGS_BEGIN)</span>
<a name="l00042"></a><a class="code" href="eeprom_8h.html#aa64fd979b52fae0aa9e4a1a189909c85">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_OUTS_SETS_OFF 0</span>
<a name="l00043"></a><a class="code" href="eeprom_8h.html#a17d8567f9124bbbfed51129492a02783">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_OUTS_NAME_OFF 1</span>
<a name="l00044"></a><a class="code" href="eeprom_8h.html#a6fdd42fb67fdc5d613f7632d5125f098">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_OUTS_NAME_LENGTH 5</span>
<a name="l00045"></a><a class="code" href="eeprom_8h.html#ac5c1f5b270315dc4a6bb15d0df6a9202">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_OUTS_SIZE (EEPROM_OUTS_NAME_OFF + EEPROM_OUTS_NAME_LENGTH)</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="eeprom_8h.html#a7135df2f983ac7559ce0d95e3d27f702">00047</a> <span class="preprocessor">#define EEPROM_TIMERS_SETTING_BEGIN ((OUTPUTS_NUM * EEPROM_OUTS_SIZE) + EEPROM_OUTS_SETTING_BEGIN)</span>
<a name="l00048"></a><a class="code" href="eeprom_8h.html#a1df44579016dcd201d865bc5b6442903">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_FROM_HOURS_OFFSET 0</span>
<a name="l00049"></a><a class="code" href="eeprom_8h.html#a12b10fea3a0407442b05d608b94677fc">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_FROM_MINUTES_OFFSET 1</span>
<a name="l00050"></a><a class="code" href="eeprom_8h.html#ace4b3644c4e9c7bea91872e18f48e05b">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_TO_HOURS_OFFSET 2</span>
<a name="l00051"></a><a class="code" href="eeprom_8h.html#afc4b402f670ecb2486cccbc70903d643">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_TO_MINUTES_OFFSET 3</span>
<a name="l00052"></a><a class="code" href="eeprom_8h.html#a6ce4d3716c7107e472375a1223af76d7">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_OUT_OFFSET 4</span>
<a name="l00053"></a><a class="code" href="eeprom_8h.html#af3fe53b01a4488b2fa2e2860716dc61e">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_FLAGS_OFFSET 5</span>
<a name="l00054"></a><a class="code" href="eeprom_8h.html#a3f89b2892d87a80e96c49828e3d4f404">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERS_SIZE (EEPROM_TIMERS_FLAGS_OFFSET + 1)</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a><a class="code" href="eeprom_8h.html#a8f2281483d6c757c9eeb0950d46ae211">00056</a> <span class="preprocessor">#define EEPROM_TIMERSV_SETTING_BEGIN (EEPROM_TIMERS_SETTING_BEGIN + EEPROM_TIMERS_SIZE * TIMERS_NUM)</span>
<a name="l00057"></a><a class="code" href="eeprom_8h.html#ac7878f78966d4f2dd66172fca03da5f8">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERSV_OFF_OFFSET 0</span>
<a name="l00058"></a><a class="code" href="eeprom_8h.html#ad1968b896205683a932b6a71f20280c5">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERSV_ON_OFFSET 1</span>
<a name="l00059"></a><a class="code" href="eeprom_8h.html#ad1ea9381fac1b54c822b063fabffc32d">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERSV_OUT_OFFSET 2</span>
<a name="l00060"></a><a class="code" href="eeprom_8h.html#adfbcc0b596acf63774298bee5792ae58">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERSV_FLAGS_OFFSET 3</span>
<a name="l00061"></a><a class="code" href="eeprom_8h.html#aa0ab379d0d27f85425eb0b897ef7a5c9">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TIMERSV_SIZE (EEPROM_TIMERSV_FLAGS_OFFSET + 1)</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a><a class="code" href="eeprom_8h.html#a472e55213daddb2cb6692fc9007d8321">00063</a> <span class="preprocessor">#define EEPROM_BASIC_SETTINGS_BEGIN (EEPROM_TIMERSV_SETTING_BEGIN + EEPROM_TIMERSV_SIZE * TIMERSV_NUM)</span>
<a name="l00064"></a><a class="code" href="eeprom_8h.html#a1d852aed568d95c77a43b534bdc621ba">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_BASIC_SETTINGS_DTF_H_O 0</span>
<a name="l00065"></a><a class="code" href="eeprom_8h.html#a23047f0c30516d7a8325ca2c96d40d78">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_BASIC_SETTINGS_DTF_M_O 1</span>
<a name="l00066"></a><a class="code" href="eeprom_8h.html#a4a38e8950b3cc46992e0f90f2dab14fa">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_BASIC_SETTINGS_DTT_H_O 2</span>
<a name="l00067"></a><a class="code" href="eeprom_8h.html#afce5b94404cce7921b52ad1c349a5a57">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_BASIC_SETTINGS_DTT_M_O 3</span>
<a name="l00068"></a><a class="code" href="eeprom_8h.html#aa0478bd8cb49c44897cccff2e9021345">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_BASIC_SIZE (EEPROM_BASIC_SETTINGS_DTT_M_O + 1)</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00070"></a><a class="code" href="eeprom_8h.html#a7a1cf45ba9bf95934559de0fd16c4dbc">00070</a> <span class="preprocessor">#define EEPROM_TOPOFF_SETTINGS_BEGIN (EEPROM_BASIC_SETTINGS_BEGIN + EEPROM_BASIC_SIZE)</span>
<a name="l00071"></a><a class="code" href="eeprom_8h.html#a2c8ac2d321c01c96722fd90ae4a2c146">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TOPOFF_FLAGS_OFFSET 0</span>
<a name="l00072"></a><a class="code" href="eeprom_8h.html#ad15ba5a86fc018314803a348c73a61d6">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TOPOFF_OUT_OFFSET 1</span>
<a name="l00073"></a><a class="code" href="eeprom_8h.html#ac9208134563737bd778cc74517916e7e">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TOPOFF_MAX_RUN_OFFSET 2</span>
<a name="l00074"></a><a class="code" href="eeprom_8h.html#a8e7a539f3a6ff375211d179881c675ce">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define EEPROM_TOPOFF_SIZE 3</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span>
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a8753597ab2c9a1c915617e9c7396718a">eeprom_write_byte</a>(uint16_t,uint8_t);
<a name="l00077"></a>00077 uint8_t <a class="code" href="eeprom_8c.html#adf8868a9d728e51be95ed68eb6e9e914">eeprom_read_byte</a>(uint16_t);
<a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#adb6be193d93cfcfc4cbb811de49e3d3c">eeprom_write_word</a>(uint16_t,uint16_t);
<a name="l00079"></a>00079 uint16_t <a class="code" href="eeprom_8c.html#a43d0c50d381f46260d96c50e760d7026">eeprom_read_word</a>(uint16_t);
<a name="l00080"></a>00080 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a483cc3c9f79cc41505ec53ee9b864558">eeprom_read_block</a>(uint16_t,uint8_t*,uint8_t);
<a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#abafcec94b2c4c21b81929018a9e18add">eeprom_write_block</a>(uint16_t,uint8_t*,uint8_t);
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a39b39f73ff559df9bb55ddb506ac69a0">load_temp_sensor_settings</a>(uint16_t,uint8_t);
<a name="l00084"></a>00084 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a93aba8083c55e31b732bf8b0a353057c">save_temp_sensor_settings</a>(uint16_t,uint8_t);
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a9f2e4f5ed9f0e29608883b8beb110a1a">load_temp_sensors_settings</a> (uint16_t);
<a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a95ff8360e350ac76979820ac7f0d71d2">save_temp_sensors_settings</a> (uint16_t);
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#aee7e8b0fc0d04c382d2c7a7373ea4c67">load_topoff_settings</a> (uint16_t);
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a89e123677f015b1b16ef3b6473451bd3">save_topoff_settings</a> (uint16_t);
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#af6bde051539f81e86c03ac0415fca42c">load_outputs_settings</a> (uint16_t);
<a name="l00092"></a>00092 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a2667a0718cfabb26df56b0735fc8b704">save_outputs_settings</a> (uint16_t);
<a name="l00093"></a>00093 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a374bb88b9696588acada95d1ef4f5048">save_output_settings</a>(uint16_t,uint8_t);
<a name="l00094"></a>00094 
<a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a847321558a6683d270e1f78fa1f46b2f">load_basic_settings</a> (uint16_t);
<a name="l00096"></a>00096 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a8b3f6991e4c5c7474845172c622b1f09">save_basic_settings</a> (uint16_t);
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a523e42ee0430ea5285f65ba3fc542425">load_timers_settings</a> (uint16_t);
<a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a4ca8c4f22ffd3423a03c85809dbd1f7d">save_timers_settings</a> (uint16_t);
<a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a88fc464a52f3adc53e944089bb1761c7">save_timer_settings</a>(uint16_t, uint8_t);
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a340778f1b13e6748454b5bbe0f9d799a">save_timerv_settings</a>(uint16_t, uint8_t);
<a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#af1e026b40c9d640e672eeb48b6ac6983">load_timersv_settings</a> (uint16_t);
<a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a7eb89ca3886a51f582d0acaab1ad880c">save_timersv_settings</a> (uint16_t);
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a9c96427c11ccfa4ebf13ba6e18458e1e">load_output_name</a>(uint16_t ,uint8_t);
<a name="l00106"></a>00106 <span class="keywordtype">void</span> <a class="code" href="eeprom_8c.html#a5e7cd7ec30ecf83c38f5b1103a640cae">save_output_name</a>(uint16_t ,uint8_t);
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="eeprom_8c.html#aae292e08a85599ebc80ed4f8ff4b2f50">output_name</a>[<a class="code" href="eeprom_8h.html#a6fdd42fb67fdc5d613f7632d5125f098">EEPROM_OUTS_NAME_LENGTH</a>+1];
</pre></div></div>
<hr size="1">
<div style="text-align: center;">
<small>Projekt udostępniony jest na zasadach Open Source. Zapoznaj się z warunkami licencji w pliku COPYING znajdujacym się w katalogu głównym.	</small>
</div>

<hr size="1">
<div style="text-align: center;">
Aquamat - sterownik akwarystyczny Open Source
<br/>
Copyright (C) 2009  <a href="http://todryk.pl">Wojciech Todryk</a> (wojciech(at)todryk(dot)pl)
</div>

<div style="text-align: right;">
<small>Dokumentację wygenerowano za pomocą programu&nbsp;</small>
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
<small> wersja 1.6.1 (Fri Apr 23 22:48:16 2010)&nbsp;</small>
</div>
